﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AllHotEx.aspx.cs" Inherits="BaoJian.WebManager.Function.ExProduct.AllHotEx" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
        <link href="../../../style/Style.css" type="text/css" rel="stylesheet"/>
        <script type="text/C#" runat="server">
            public string SetChecked(bool c)
            {
                if (c)
                    return "checked";
                else
                    return "";
            }
        </script>
</head>
<body background="../../../images/right-bj.gif" bottommargin="0">
    <form id="form1" runat="server">
     <div style="float: left">
        <div style="float: left; width: 350px">
            <asp:Label ID="Msg" runat="server" Visible="true"></asp:Label></div>
        <div style="float: right">
            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;          
            <asp:Button ID="SetTop" runat="server"
                Text="设为Top2" onclick="SetTop_Click"  />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="DelTop" runat="server" Text="取消Top2" onclick="DelTop_Click"  />&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:Button ID="Delete" runat="server" Text="删除" onclick="Delete_Click"  />&nbsp;&nbsp;&nbsp;&nbsp;
        </div>
    </div>
     <div>
        <div>
            &nbsp;</div>
        <div>
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="false" BorderStyle="None"
                BorderWidth="1px" BorderColor="#CCCCCC" BackColor="White" CellPadding="3" 
                Width="100%" AllowPaging="True" 
                onpageindexchanging="GridView1_PageIndexChanging">
                <HeaderStyle Font-Size="9pt" Font-Names="宋体" Font-Bold="True" ForeColor="Black" BackColor="SkyBlue">
                </HeaderStyle>
                <SelectedRowStyle Font-Bold="True" ForeColor="White" BackColor="#669999"></SelectedRowStyle>
                <RowStyle ForeColor="Black" BackColor="White"></RowStyle>
                <Columns>
                    <asp:BoundField DataField="SID" HeaderText="序号" ReadOnly="True" SortExpression="SID" />
                    <asp:BoundField DataField="ProductName" HeaderText="产品名称" ReadOnly="True" SortExpression="ProductName" />
                    <asp:BoundField DataField="CustomerID" HeaderText="用户账号" ReadOnly="True" SortExpression="CustomerID" />
                    <asp:BoundField DataField="TotalNum" HeaderText="交换的产品总数量" ReadOnly="True" SortExpression="TotalNum" />
                    <asp:BoundField DataField="RegDate" HeaderText="注册时间" ReadOnly="True" SortExpression="RegDate"
                        DataFormatString="{0:yyyy-MM-dd}" />
                    <asp:BoundField DataField="Deadline" HeaderText="最后期限" ReadOnly="True" SortExpression="Deadline"
                        DataFormatString="{0:yyyy-MM-dd}" />   
                    <asp:HyperLinkField HeaderText="查看详情"    DataNavigateUrlFields="SID" Text="查看详情" 
                    DataNavigateUrlFormatString="../exchange/detail.aspx?SID={0}"    />
                    <asp:TemplateField HeaderText="Top2">
                        <ItemTemplate>                      
                            <input type="checkbox" id="Top2CB" name="Top2CB"  <%# SetChecked(Convert.ToBoolean(DataBinder.Eval(Container.DataItem,"TopProduct")))%> 
                              value="<%# DataBinder.Eval(Container.DataItem,"SID")%>" >                          
                        </ItemTemplate>
                    </asp:TemplateField>      
                    <asp:TemplateField HeaderText="选择">
                        <ItemTemplate>
                            <input type="checkbox" id="selectCB" name="selectCB" value="<%# DataBinder.Eval(Container.DataItem,"SID")%>">
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
                <AlternatingRowStyle BackColor="#D8D58D" BorderColor="DarkGray" BorderStyle="Dashed"
                    BorderWidth="1px" />
            </asp:GridView>
        </div>
    </div>
    </form>
</body>
</html>
